home *** CD-ROM | disk | FTP | other *** search
- public class DisciplinePsychicProjection extends Discipline {
- private static final String DISCIPLINE_NAME = "PsychicProjection";
-
- public int cast(int level, int casterGuid) {
- if (!((Discipline)this).CheckCastParameters(level, casterGuid, "PsychicProjection")) {
- return 0;
- } else {
- ((Discipline)this).SetupWorld("PsychicProjection");
- if (((Discipline)this).Fizzled(level)) {
- ((Discipline)this).DisplayFizzle("PsychicProjection", level);
- return 0;
- } else {
- try {
- int projGuid = super.casterThing.SpawnThingNear("astralProjection", 0.0F, 0);
- CodexActor target = new CodexActor(projGuid);
- target.AddActorEffectByLevel("ef_disc_psychicprojection", Discipline.PSYCHICPROJECTION_DURATIONS[level], level, casterGuid, 4);
- ((Discipline)this).DisplayCast("PsychicProjection", level);
- return 1;
- } catch (Exception var6) {
- CodexConsole.PrintException(((Throwable)var6).getMessage() + " in " + "PsychicProjection" + " [cast]");
- return 0;
- } catch (Error var7) {
- CodexConsole.PrintError(((Throwable)var7).getMessage() + " in " + "PsychicProjection" + " [cast]");
- return 0;
- }
- }
- }
- }
- }
-